<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Navo Portable Library: 单向线形链表</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 制作者 Doxygen 1.7.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Navo Portable Library&#160;<span id="projectnumber">Ver 1.0.20120827</span></div>
   <div id="projectbrief">Provides generic platform independent facilities.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>数据结构</span></a></li>
      <li><a href="files.html"><span>文件</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">数据结构</a> &#124;
<a href="#define-members">宏定义</a> &#124;
<a href="#typedef-members">类型定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<h1>单向线形链表</h1>  </div>
<div class="ingroups"><a class="el" href="group___xE9_x93_xBE_xE5_xBC_x8F_xE8_xA1_xA8.html">链式表</a></div></div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
数据结构</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct____sllnk__node.html">__sllnk_node</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">单向线形链表节点  <a href="struct____sllnk__node.html#_details">更多...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
宏定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga6204e8e15b285f8c8f9338e6923c4603">SLLNK_HEAD</a>(name)&#160;&#160;&#160;<a class="el" href="struct____sllnk__node.html">sllnk_head</a> name = {NULL}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的表头，并对其初始化  <a href="#ga6204e8e15b285f8c8f9338e6923c4603"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gad660429ac591bc2e11ac660f7fc99ef9">SLLNK_NODE</a>(name)&#160;&#160;&#160;<a class="el" href="struct____sllnk__node.html">sllnk_node</a> name = {NULL}</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">定义一个名为name的节点，并对其初始化  <a href="#gad660429ac591bc2e11ac660f7fc99ef9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga49f9ca675d1c961bc7a1eb7f3125de08"></a><!-- doxytag: member="单向线形链表::SLLNK_CHECK_PASS" ref="ga49f9ca675d1c961bc7a1eb7f3125de08" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLLNK_CHECK_PASS</b>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga95c0580281bf87769db38ffed876ffba"></a><!-- doxytag: member="单向线形链表::SLLNK_CHECK_LOOP" ref="ga95c0580281bf87769db38ffed876ffba" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>SLLNK_CHECK_LOOP</b>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga66e49ff1a172491e65ca54e93028e105"></a><!-- doxytag: member="单向线形链表::sllnk_inc" ref="ga66e49ff1a172491e65ca54e93028e105" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga66e49ff1a172491e65ca54e93028e105">sllnk_inc</a>(itr)&#160;&#160;&#160;((itr) = (itr)-&gt;next)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器递增 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5ad9cdcf3a9e295b51a12365f08982b4"></a><!-- doxytag: member="单向线形链表::sllnk_prev_inc" ref="ga5ad9cdcf3a9e295b51a12365f08982b4" args="(itr, prev)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga5ad9cdcf3a9e295b51a12365f08982b4">sllnk_prev_inc</a>(itr, prev)&#160;&#160;&#160;((prev) = (itr), sllnk_inc(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器递增，并更新前驱迭代器 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8f56fbc2aa8e161d582839169db33ff7"></a><!-- doxytag: member="单向线形链表::sllnk_inc_later" ref="ga8f56fbc2aa8e161d582839169db33ff7" args="(itr)" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga8f56fbc2aa8e161d582839169db33ff7">sllnk_inc_later</a>(itr)&#160;&#160;&#160;__sllnk_inc_later(itr, &amp;(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器后自增 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga0b72121b96263415557459d60ae97111">sllnk_foreach</a>(_begin, _end, fn, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">正向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏  <a href="#ga0b72121b96263415557459d60ae97111"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga82a18806a2239e6725b743ea57d3db90">sllnk_search</a>(head, _begin, _end, equal, var, res, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">顺序查找区域内的指定节点  <a href="#ga82a18806a2239e6725b743ea57d3db90"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3cc566e864a08f9a5d5aae4ccb525768">sllnk_vpush</a>(head, itr)&#160;&#160;&#160;sllnk_push_front(head, sllnk_inc_later(itr))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">入栈反转操作  <a href="#ga3cc566e864a08f9a5d5aae4ccb525768"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3accd691a53c124906fcbc1193c479fe">sllnk_serialize</a>(head, buf, type, member)&#160;&#160;&#160;__sllnk_serialize(head, (char**)(buf), offset_of(type, member))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">表的序列化  <a href="#ga3accd691a53c124906fcbc1193c479fe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gac4c1d75fd2b796cc96095c076e0c5b24">sllnk_deserialize</a>(head, buf, cnt, type, member)&#160;&#160;&#160;__sllnk_deserialize(head, (char**)(buf), cnt, offset_of(type, member))</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">表的反序列化  <a href="#gac4c1d75fd2b796cc96095c076e0c5b24"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gabdd7cb94ea6a866fa1e255e34b6b49cc">sllnk_sort_insert</a>(head, newly, greater_equal, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">按升序插入新节点  <a href="#gabdd7cb94ea6a866fa1e255e34b6b49cc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae81b65037e8dfc7fb53a6bc284787079">sllnk_is_sorted</a>(_begin, _end, greater_equal, res, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断表是否按序  <a href="#gae81b65037e8dfc7fb53a6bc284787079"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae7eec31cbfd41f487ae7aa14322411aa">sllnk_bubble_sort</a>(bprev, _begin, _end, greater, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">对表进行冒泡排序  <a href="#gae7eec31cbfd41f487ae7aa14322411aa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9ed645e7bd4da0be5b3e862cd8069f46">sllnk_oddeven_sort</a>(bprev, _begin, _end, greater, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">对表进行奇偶排序  <a href="#ga9ed645e7bd4da0be5b3e862cd8069f46"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><b>__sllnk_oddeven_scan</b>(greater, type, member, prev, _start)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga5fa4d81762787f660e71b5176c4013f6">sllnk_select_sort</a>(bprev, _begin, _end, greater, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">对表进行选择排序  <a href="#ga5fa4d81762787f660e71b5176c4013f6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaa38a8df25dd9a93ac472d20d647afc98">sllnk_insert_sort</a>(bprev, _begin, _end, greater_equal, type, member)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">对表进行插入排序  <a href="#gaa38a8df25dd9a93ac472d20d647afc98"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
类型定义</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaa5bd6699bf7f21b319fe54d33c8b8134"></a><!-- doxytag: member="单向线形链表::sllnk_node" ref="gaa5bd6699bf7f21b319fe54d33c8b8134" args="" -->
typedef struct <a class="el" href="struct____sllnk__node.html">__sllnk_node</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaa5bd6699bf7f21b319fe54d33c8b8134">sllnk_node</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">节点 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga39fa3e813e6a625efe53eaf0d93ce11b"></a><!-- doxytag: member="单向线形链表::sllnk_head" ref="ga39fa3e813e6a625efe53eaf0d93ce11b" args="" -->
typedef struct <a class="el" href="struct____sllnk__node.html">__sllnk_node</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga39fa3e813e6a625efe53eaf0d93ce11b">sllnk_head</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">表头 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga19922a45d34b561d1422277153911306"></a><!-- doxytag: member="单向线形链表::sllnk_iter" ref="ga19922a45d34b561d1422277153911306" args="" -->
typedef struct <a class="el" href="struct____sllnk__node.html">__sllnk_node</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga19922a45d34b561d1422277153911306">sllnk_iter</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">迭代器 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6f2d9337131eea4f623e0cf80851222e"></a><!-- doxytag: member="单向线形链表::sllnk_pr1" ref="ga6f2d9337131eea4f623e0cf80851222e" args=")(sllnk_node *)" -->
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga6f2d9337131eea4f623e0cf80851222e">sllnk_pr1</a> )(<a class="el" href="struct____sllnk__node.html">sllnk_node</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">单参数回调函数指针 <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga792055c4019899e119e0effca0a439d9"></a><!-- doxytag: member="单向线形链表::sllnk_pr2" ref="ga792055c4019899e119e0effca0a439d9" args=")(sllnk_node *, sllnk_node *)" -->
typedef int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga792055c4019899e119e0effca0a439d9">sllnk_pr2</a> )(<a class="el" href="struct____sllnk__node.html">sllnk_node</a> *, <a class="el" href="struct____sllnk__node.html">sllnk_node</a> *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">双参数回调函数指针 <br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
函数</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaf3a28f89d0fda0521c30210350488f87">sllnk_check</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> *loop_entry)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断链表结构是否正常  <a href="#gaf3a28f89d0fda0521c30210350488f87"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9db979ce8eb374bd90663f8198f7640c">sllnk_init</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化表头  <a href="#ga9db979ce8eb374bd90663f8198f7640c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaa9ec544e0a8ad92808fa2669ead6fa95">sllnk_empty</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断表是否为空  <a href="#gaa9ec544e0a8ad92808fa2669ead6fa95"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1ec6415690b99d66e2192787452ed58e"></a><!-- doxytag: member="单向线形链表::__sllnk_singular" ref="ga1ec6415690b99d66e2192787452ed58e" args="(sllnk_node *front)" -->
static int&#160;</td><td class="memItemRight" valign="bottom"><b>__sllnk_singular</b> (<a class="el" href="struct____sllnk__node.html">sllnk_node</a> *front)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga13cb4a8dee9d5a76883be42da95242d2">sllnk_singular</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断表是否只有单个节点  <a href="#ga13cb4a8dee9d5a76883be42da95242d2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga64040e29b9c1ec653152659570049967">sllnk_sortable</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> begin, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> end)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断表是否可以排序  <a href="#ga64040e29b9c1ec653152659570049967"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaf2fdf863715cfc6cd8b72da21d7cbfef">sllnk_serialable</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断表是否可以序列化  <a href="#gaf2fdf863715cfc6cd8b72da21d7cbfef"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga48f184f2bb9b0127577d0cf60aac9910">sllnk_link</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> prev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> next)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">链接两个节点  <a href="#ga48f184f2bb9b0127577d0cf60aac9910"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga839ab5172ceae9b8850828d733dad8bb">sllnk_insert_between</a> (<a class="el" href="struct____sllnk__node.html">sllnk_node</a> *newly, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> prev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> next)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">在两个节点之间插入一个新节点  <a href="#ga839ab5172ceae9b8850828d733dad8bb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga46ec6a361119752b8cfd6e9e96acb922">sllnk_insert</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> prev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> pos, <a class="el" href="struct____sllnk__node.html">sllnk_node</a> *newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">插入节点到指定位置  <a href="#ga46ec6a361119752b8cfd6e9e96acb922"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4b7aa639ac401210a396f01293c5e002">sllnk_erase</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> prev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> entry)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">擦除节点  <a href="#ga4b7aa639ac401210a396f01293c5e002"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga579f3b6b85a7f1c366bdb1490ff51596"></a><!-- doxytag: member="单向线形链表::__sllnk_free" ref="ga579f3b6b85a7f1c366bdb1490ff51596" args="(sllnk_iter begin, sllnk_iter end, sllnk_pr1 erase_handler)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__sllnk_free</b> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> begin, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> end, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga6f2d9337131eea4f623e0cf80851222e">sllnk_pr1</a> erase_handler)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga5a5b7fc4485177c98650d4e37c1c203c">sllnk_erases</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> bprev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> begin, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> end, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga6f2d9337131eea4f623e0cf80851222e">sllnk_pr1</a> erase_handler)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">清空区域  <a href="#ga5a5b7fc4485177c98650d4e37c1c203c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga2efa8b83e260b8089162cf07bcf1d1ac">sllnk_clear</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga6f2d9337131eea4f623e0cf80851222e">sllnk_pr1</a> erase_handler)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">清空表  <a href="#ga2efa8b83e260b8089162cf07bcf1d1ac"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae69537c14fd302544fc35320d1d46239">sllnk_push_front</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head, <a class="el" href="struct____sllnk__node.html">sllnk_node</a> *newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">在表首添加节点  <a href="#gae69537c14fd302544fc35320d1d46239"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga2552641116eba8642dd337f222c80bfb">sllnk_pop_front</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">移除表首节点  <a href="#ga2552641116eba8642dd337f222c80bfb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga35dc866136e1b138ae33345040d6f77c">sllnk_splice_between</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> prev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> next, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> first_prev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> first, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> last, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> last_next)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">在两个节点之间插入多个连续节点  <a href="#ga35dc866136e1b138ae33345040d6f77c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaef1c4facd637f5e45cab45bb49fbde89">sllnk_splice</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> prev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> pos, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> first_prev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> first, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> last)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">在两个节点之间插入多个连续节点  <a href="#gaef1c4facd637f5e45cab45bb49fbde89"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga6ccd0259977fb9ff2af4ecd88b58c69a">sllnk_count</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">统计表的节点数量  <a href="#ga6ccd0259977fb9ff2af4ecd88b58c69a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gab571a5517dd25a0ec46f2366cc82ceb8">sllnk_distance</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> first, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> last)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算两个节点的迭代距离  <a href="#gab571a5517dd25a0ec46f2366cc82ceb8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga2694883bb0b412a2f5cb42bd28e836f0">sllnk_advance</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> cur, size_t dist)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">给迭代器增加一段距离或减小一段距离  <a href="#ga2694883bb0b412a2f5cb42bd28e836f0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga8de47ce32788fc05494a1391035a980c">sllnk_at</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head, const size_t index)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">根据正向索引得到迭代器  <a href="#ga8de47ce32788fc05494a1391035a980c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9716e197658ec5b83603c054f081ae5c">sllnk_index_of</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">计算迭代器的正向索引  <a href="#ga9716e197658ec5b83603c054f081ae5c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga190d801d0f6ad9a29f22d64fa4364bdb">sllnk_node_init</a> (<a class="el" href="struct____sllnk__node.html">sllnk_node</a> *entry)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化节点  <a href="#ga190d801d0f6ad9a29f22d64fa4364bdb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaa7ccf98727ba5b9c30c745fd3d1ca093">sllnk_iter_replace</a> (<a class="el" href="struct____sllnk__node.html">sllnk_node</a> *vprev, <a class="el" href="struct____sllnk__node.html">sllnk_node</a> *victim, <a class="el" href="struct____sllnk__node.html">sllnk_node</a> *newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用新节点替换目标节点  <a href="#gaa7ccf98727ba5b9c30c745fd3d1ca093"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gacf0d1f4c1c82c886e812345d127d0d5c"></a><!-- doxytag: member="单向线形链表::__sllnk_iter_swap" ref="gacf0d1f4c1c82c886e812345d127d0d5c" args="(sllnk_iter aprev, sllnk_iter a, sllnk_iter anext, sllnk_iter bprev, sllnk_iter b, sllnk_iter bnext)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__sllnk_iter_swap</b> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> aprev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> a, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> anext, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> bprev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> b, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> bnext)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga025032aebb054b46a91bab860f2278fe">sllnk_iter_swap</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> aprev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> a, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> bprev, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">交换两个节点  <a href="#ga025032aebb054b46a91bab860f2278fe"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga0f593516aa686d3bfc8556592adceca3">sllnk_replace</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *victim, <a class="el" href="struct____sllnk__node.html">sllnk_head</a> *newly)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">用新表头替换目标表头  <a href="#ga0f593516aa686d3bfc8556592adceca3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9ccf3f5861befba89c4a938bfc4b2034"></a><!-- doxytag: member="单向线形链表::__sllnk_swap" ref="ga9ccf3f5861befba89c4a938bfc4b2034" args="(sllnk_iter a, sllnk_iter afront, sllnk_iter b, sllnk_iter bfront)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>__sllnk_swap</b> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> a, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> afront, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> b, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> bfront)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad2da72260df3ece6be0133f8cae0d98e"></a><!-- doxytag: member="单向线形链表::sllnk_swap" ref="gad2da72260df3ece6be0133f8cae0d98e" args="(sllnk_head *a, sllnk_head *b)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><b>sllnk_swap</b> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *a, <a class="el" href="struct____sllnk__node.html">sllnk_head</a> *b)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gac039ab7a892f93c222db2ebd2bc9bedd">sllnk_exist</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">判断一个节点是否存在于表中  <a href="#gac039ab7a892f93c222db2ebd2bc9bedd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gafb2f6a5ef9f9022c078c9e14a5f17a19">sllnk_front</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到表首节点  <a href="#gafb2f6a5ef9f9022c078c9e14a5f17a19"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae0332daf7a77f42da92bc167e9d1c20f">sllnk_begin</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向正向起始位置的迭代器  <a href="#gae0332daf7a77f42da92bc167e9d1c20f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gadb1426ce49b23aa186963607e40d799f">sllnk_pbegin</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向正向起始位置前驱的迭代器  <a href="#gadb1426ce49b23aa186963607e40d799f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9405c7571626041455287739689711ed">sllnk_end</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到指向正向终止位置的迭代器  <a href="#ga9405c7571626041455287739689711ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga8531e6d10114d55255b7bb8c0f46cc56">sllnk_end_of</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前迭代器的正向终止位置  <a href="#ga8531e6d10114d55255b7bb8c0f46cc56"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga32fbba7563e8bc0df1b1ab1c5709834f">sllnk_next</a> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> itr)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到当前节点的后继节点  <a href="#ga32fbba7563e8bc0df1b1ab1c5709834f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1868a4ed3659de90540a531e45e43028"></a><!-- doxytag: member="单向线形链表::__sllnk_inc_later" ref="ga1868a4ed3659de90540a531e45e43028" args="(sllnk_iter cur, sllnk_iter *p)" -->
static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><b>__sllnk_inc_later</b> (<a class="el" href="struct____sllnk__node.html">sllnk_iter</a> cur, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> *p)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6604c6003bb3f16278952c90acca8b14"></a><!-- doxytag: member="单向线形链表::__sllnk_vbegin" ref="ga6604c6003bb3f16278952c90acca8b14" args="(sllnk_head *head, sllnk_iter front)" -->
static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><b>__sllnk_vbegin</b> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head, <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> front)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4c010000f3a7fc4d9c3ff5199896d627">sllnk_vbegin</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到用于反转的起始位置的迭代器  <a href="#ga4c010000f3a7fc4d9c3ff5199896d627"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga169be3d345b481c5c2655abbfd663826">sllnk_vend</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">得到用于反转的终止位置的迭代器  <a href="#ga169be3d345b481c5c2655abbfd663826"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NV_API void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga71dc4ef578add6513b4eb045b41dcecb">sllnk_reverse</a> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">反转表  <a href="#ga71dc4ef578add6513b4eb045b41dcecb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7f20c0fa59a68006d7db15c4d5f5e707"></a><!-- doxytag: member="单向线形链表::__sllnk_serialize" ref="ga7f20c0fa59a68006d7db15c4d5f5e707" args="(sllnk_head *head, char **buf, const size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__sllnk_serialize</b> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head, char **buf, const size_t offset)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga22438e316bfe1654ca8fa99f4d0f0686"></a><!-- doxytag: member="单向线形链表::__sllnk_deserialize" ref="ga22438e316bfe1654ca8fa99f4d0f0686" args="(sllnk_head *head, char **buf, size_t cnt, const size_t offset)" -->
NV_API void&#160;</td><td class="memItemRight" valign="bottom"><b>__sllnk_deserialize</b> (<a class="el" href="struct____sllnk__node.html">sllnk_head</a> *head, char **buf, size_t cnt, const size_t offset)</td></tr>
</table>
<hr/><h2>宏定义文档</h2>
<a class="anchor" id="ga6204e8e15b285f8c8f9338e6923c4603"></a><!-- doxytag: member="sllnk.h::SLLNK_HEAD" ref="ga6204e8e15b285f8c8f9338e6923c4603" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SLLNK_HEAD</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="struct____sllnk__node.html">sllnk_head</a> name = {NULL}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的表头，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>表头名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00053">53</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gad660429ac591bc2e11ac660f7fc99ef9"></a><!-- doxytag: member="sllnk.h::SLLNK_NODE" ref="gad660429ac591bc2e11ac660f7fc99ef9" args="(name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SLLNK_NODE</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name</td><td>)</td>
          <td>&#160;&#160;&#160;<a class="el" href="struct____sllnk__node.html">sllnk_node</a> name = {NULL}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>定义一个名为name的节点，并对其初始化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>节点名称 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00054">54</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga0b72121b96263415557459d60ae97111"></a><!-- doxytag: member="sllnk.h::sllnk_foreach" ref="ga0b72121b96263415557459d60ae97111" args="(_begin, _end, fn, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_foreach</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">fn, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {<a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _q_e = (_end);                           \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _q_f = (_begin);                         \
        <span class="keywordflow">while</span> (_q_f != _q_e) {                              \
            type * _q_t = container_of(_q_f, type, member); \
            _q_f = _q_f-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                              \
            fn(_q_t);                                       \
        }                                                   \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>正向遍历_begin到_end的节点，并为每一个节点调用回调函数或宏 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">fn</td><td>回调函数或宏 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00675">675</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga82a18806a2239e6725b743ea57d3db90"></a><!-- doxytag: member="sllnk.h::sllnk_search" ref="ga82a18806a2239e6725b743ea57d3db90" args="(head, _begin, _end, equal, var, res, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_search</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">head, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">equal, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">var, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">res, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _q_e = (_end);                               \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _q_f = (_begin);                             \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_head</a>* _q_h = (head);                              \
        (res) = NULL;                                           \
        <span class="keywordflow">while</span> (_q_f != _q_e) {                                  \
            type * _q_cb = container_of(_q_f, type, member);    \
            <span class="keywordflow">if</span> (equal(_q_cb, (val))) {                          \
                (res) = _q_cb;                                  \
                <span class="keywordflow">break</span>;                                          \
            }                                                   \
            _q_f = _q_f-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                                  \
        }                                                       \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>顺序查找区域内的指定节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">equal</td><td>比较函数或宏。相等时返回1，不相等返回0 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">var</td><td>搜索的键值，常量，变量均可 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>保存搜索结果的变量，类型是节点指针。结果为NULL表示找不到节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00697">697</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga3cc566e864a08f9a5d5aae4ccb525768"></a><!-- doxytag: member="sllnk.h::sllnk_vpush" ref="ga3cc566e864a08f9a5d5aae4ccb525768" args="(head, itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_vpush</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">head, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">itr&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;sllnk_push_front(head, sllnk_inc_later(itr))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>入栈反转操作 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 反转表</span>
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> ve = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga169be3d345b481c5c2655abbfd663826" title="得到用于反转的终止位置的迭代器">sllnk_vend</a>(&amp;head);
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> vi = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4c010000f3a7fc4d9c3ff5199896d627" title="得到用于反转的起始位置的迭代器">sllnk_vbegin</a>(&amp;head);
    <span class="keywordflow">while</span> (vi != ve) {
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3cc566e864a08f9a5d5aae4ccb525768" title="入栈反转操作">sllnk_vpush</a>(&amp;head, vi);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4c010000f3a7fc4d9c3ff5199896d627" title="得到用于反转的起始位置的迭代器">sllnk_vbegin</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga169be3d345b481c5c2655abbfd663826" title="得到用于反转的终止位置的迭代器">sllnk_vend</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga71dc4ef578add6513b4eb045b41dcecb" title="反转表">sllnk_reverse</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00787">787</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga3accd691a53c124906fcbc1193c479fe"></a><!-- doxytag: member="sllnk.h::sllnk_serialize" ref="ga3accd691a53c124906fcbc1193c479fe" args="(head, buf, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_serialize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">head, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">buf, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;__sllnk_serialize(head, (char**)(buf), offset_of(type, member))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>表的序列化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>序列缓存 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会遍历整个表，逐个将节点的拥有者地址存入缓存 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 判断是否可以序列化</span>
    <span class="keywordflow">if</span> (<a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaf2fdf863715cfc6cd8b72da21d7cbfef" title="判断表是否可以序列化">sllnk_serialable</a>(&amp;head)) {
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga39fa3e813e6a625efe53eaf0d93ce11b" title="表头">sllnk_head</a>(DATA*) seq;
        <span class="comment">// 分配序列缓存</span>
        DATA** buf = (DATA**)malloc(sizeof(DATA*) * list_cnt);
        <span class="comment">// 序列化</span>
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3accd691a53c124906fcbc1193c479fe" title="表的序列化">sllnk_serialize</a>(&amp;head, buf, DATA, node);
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga08213d0c7bcf381b466b18e3822c6934" title="初始化序列">SLSEQ_INIT_SERIAL</a>(DATA*, &amp;seq, buf, list_cnt);
        <span class="comment">// 希尔排序</span>
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga197b786747dc3c95744f2bf8060b36ad" title="希尔排序">slseq_shell_sort</a>(DATA*, <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga2696503718b3292109d395da44c988b6" title="得到指向正向起始位置的迭代器">slseq_begin</a>(&amp;seq), 
            <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga5b3212d3b18809e193c701f7c6fef755" title="得到指向正向终止位置的迭代器">slseq_end</a>(&amp;seq), DATA_Greater);
        <span class="comment">// 反序列化</span>
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gac4c1d75fd2b796cc96095c076e0c5b24" title="表的反序列化">sllnk_deserialize</a>(&amp;head, buf, list_cnt, DATA, node);
        <span class="comment">// 释放缓存</span>
        free(buf);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gac4c1d75fd2b796cc96095c076e0c5b24" title="表的反序列化">sllnk_deserialize</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaf2fdf863715cfc6cd8b72da21d7cbfef" title="判断表是否可以序列化">sllnk_serialable</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00832">832</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gac4c1d75fd2b796cc96095c076e0c5b24"></a><!-- doxytag: member="sllnk.h::sllnk_deserialize" ref="gac4c1d75fd2b796cc96095c076e0c5b24" args="(head, buf, cnt, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_deserialize</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">head, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">buf, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">cnt, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;__sllnk_deserialize(head, (char**)(buf), cnt, offset_of(type, member))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>表的反序列化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>序列缓存 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">cnt</td><td>序列长度 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会遍历整个序列来还原整个表 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 判断是否可以序列化</span>
    <span class="keywordflow">if</span> (<a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaf2fdf863715cfc6cd8b72da21d7cbfef" title="判断表是否可以序列化">sllnk_serialable</a>(&amp;head)) {
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#gab7b8f6f20db0f3e5681fd2184b1ae60c" title="type类型表头">slseq_head</a> seq(DATA*);
        <span class="comment">// 分配序列缓存</span>
        DATA** buf = (DATA**)malloc(<span class="keyword">sizeof</span>(DATA*) * list_cnt);
        <span class="comment">// 序列化</span>
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3accd691a53c124906fcbc1193c479fe" title="表的序列化">sllnk_serialize</a>(&amp;head, buf, DATA, node);
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga08213d0c7bcf381b466b18e3822c6934" title="初始化序列">SLSEQ_INIT_SERIAL</a>(DATA*, &amp;seq, buf, list_cnt);
        <span class="comment">// 希尔排序</span>
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga197b786747dc3c95744f2bf8060b36ad" title="希尔排序">slseq_shell_sort</a>(DATA*, <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga2696503718b3292109d395da44c988b6" title="得到指向正向起始位置的迭代器">slseq_begin</a>(&amp;seq), 
            <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga5b3212d3b18809e193c701f7c6fef755" title="得到指向正向终止位置的迭代器">slseq_end</a>(&amp;seq), DATA_Greater);
        <span class="comment">// 反序列化</span>
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gac4c1d75fd2b796cc96095c076e0c5b24" title="表的反序列化">sllnk_deserialize</a>(&amp;head, buf, list_cnt, DATA, node);
        <span class="comment">// 释放缓存</span>
        free(buf);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3accd691a53c124906fcbc1193c479fe" title="表的序列化">sllnk_serialize</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaf2fdf863715cfc6cd8b72da21d7cbfef" title="判断表是否可以序列化">sllnk_serialable</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00865">865</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gabdd7cb94ea6a866fa1e255e34b6b49cc"></a><!-- doxytag: member="sllnk.h::sllnk_sort_insert" ref="gabdd7cb94ea6a866fa1e255e34b6b49cc" args="(head, newly, greater_equal, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_sort_insert</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">head, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">newly, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater_equal, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_n = (newly);                              \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_head</a>* _k_h = (head);                              \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_j = _k_h;                                 \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_i = _k_h-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                           \
        <span class="keywordflow">while</span> (_k_i != _k_h) {                                  \
            type * _k_pi = container_of(_k_i, type, member);    \
            type * _k_pn = container_of(_k_n, type, member);    \
            <span class="keywordflow">if</span> (greater_equal(_k_pi, _k_pn))                    \
                <span class="keywordflow">break</span>;                                          \
            _k_j = _k_i;                                        \
            _k_i = _k_i-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                                  \
        }                                                       \
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga46ec6a361119752b8cfd6e9e96acb922" title="插入节点到指定位置">sllnk_insert</a>(_k_j, _k_i, _k_n);                         \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>按升序插入新节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater_equal</td><td>比较函数或宏， 升序:((*i)-&gt;x &gt;= (*j)-&gt;x) 降序:((*i)-&gt;x &lt;= (*j)-&gt;x) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00879">879</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gae81b65037e8dfc7fb53a6bc284787079"></a><!-- doxytag: member="sllnk.h::sllnk_is_sorted" ref="gae81b65037e8dfc7fb53a6bc284787079" args="(_begin, _end, greater_equal, res, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_is_sorted</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater_equal, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">res, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_e = (_end);                               \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_i = (_begin);                             \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_j = _k_i-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                           \
        (res) = 1;                                              \
        <span class="keywordflow">while</span> (_k_j != _k_e) {                                  \
            type * _k_pi = container_of(_k_i, type, member);    \
            type * _k_pj = container_of(_k_j, type, member);    \
            <span class="keywordflow">if</span> (!(greater_equal(_k_pj, _k_pi))) {               \
                (res) = 0;                                      \
                <span class="keywordflow">break</span>;                                          \
            }                                                   \
            _k_i = _k_j;                                        \
            _k_j = _k_j-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                                  \
        }                                                       \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>判断表是否按序 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater_equal</td><td>比较函数或宏， 升序:((*i)-&gt;x &gt;= (*j)-&gt;x) 降序:((*i)-&gt;x &lt;= (*j)-&gt;x) </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">res</td><td>保存输出结果的变量 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae7eec31cbfd41f487ae7aa14322411aa" title="对表进行冒泡排序">sllnk_bubble_sort</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9ed645e7bd4da0be5b3e862cd8069f46" title="对表进行奇偶排序">sllnk_oddeven_sort</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga5fa4d81762787f660e71b5176c4013f6" title="对表进行选择排序">sllnk_select_sort</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaa38a8df25dd9a93ac472d20d647afc98" title="对表进行插入排序">sllnk_insert_sort</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga64040e29b9c1ec653152659570049967" title="判断表是否可以排序">sllnk_sortable</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00909">909</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gae7eec31cbfd41f487ae7aa14322411aa"></a><!-- doxytag: member="sllnk.h::sllnk_bubble_sort" ref="gae7eec31cbfd41f487ae7aa14322411aa" args="(bprev, _begin, _end, greater, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_bubble_sort</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bprev, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <span class="keywordtype">int</span> _k_pc = 1;                                              \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_e = (_end);                                   \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_i = (_begin);                                 \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_ip = (bprev);                                 \
        <span class="keywordflow">for</span> (; _k_pc &amp;&amp; _k_i != _k_e; _k_i = _k_i-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>) {          \
            <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_jp = _k_i;                                \
            <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_j = _k_i-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                           \
            <span class="keywordflow">for</span> (_k_pc = 0; _k_j != _k_e; _k_j = _k_j-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>) {      \
                type * _k_pi = container_of(_k_i, type, member);    \
                type * _k_pj = container_of(_k_j, type, member);    \
                <span class="keywordflow">if</span> (greater(_k_pi, _k_pj)) {                        \
                    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_t = _k_i;                         \
                    _k_i = _k_j;                                    \
                    _k_j = _k_t;                                    \
                    <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga025032aebb054b46a91bab860f2278fe" title="交换两个节点">sllnk_iter_swap</a>(_k_jp, _k_i, _k_ip, _k_j);      \
                    _k_pc = 1;                                      \
                }                                                   \
                _k_jp = _k_j;                                       \
            }                                                       \
            _k_ip = _k_i;                                           \
        }                                                           \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>对表进行冒泡排序 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">bprev</td><td>起始位置前驱 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏 升序:((*i)-&gt;x &gt; (*j)-&gt;x) 降序:((*i)-&gt;x &lt; (*j)-&gt;x) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga64040e29b9c1ec653152659570049967" title="判断表是否可以排序">sllnk_sortable</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae81b65037e8dfc7fb53a6bc284787079" title="判断表是否按序">sllnk_is_sorted</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00945">945</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9ed645e7bd4da0be5b3e862cd8069f46"></a><!-- doxytag: member="sllnk.h::sllnk_oddeven_sort" ref="ga9ed645e7bd4da0be5b3e862cd8069f46" args="(bprev, _begin, _end, greater, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_oddeven_sort</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bprev, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <span class="keywordtype">int</span> _k_pc = 1;                                                      \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_e = (_end);                                           \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_f = (_begin);                                         \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_p = (bprev);                                          \
        <span class="keywordflow">while</span> (_k_pc) {                                                     \
            _k_pc = 0;                                                      \
            _k_f = _k_p-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                                              \
            __sllnk_oddeven_scan(greater, type, member, _k_p, _k_f);        \
            __sllnk_oddeven_scan(greater, type, member, _k_f, _k_f-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>);  \
        }                                                                   \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>对表进行奇偶排序 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">bprev</td><td>起始位置前驱 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏 升序:((*i)-&gt;x &gt; (*j)-&gt;x) 降序:((*i)-&gt;x &lt; (*j)-&gt;x) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga64040e29b9c1ec653152659570049967" title="判断表是否可以排序">sllnk_sortable</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae81b65037e8dfc7fb53a6bc284787079" title="判断表是否按序">sllnk_is_sorted</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00982">982</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gafcc387081a3a7b1c4e056053444908ac"></a><!-- doxytag: member="sllnk.h::__sllnk_oddeven_scan" ref="gafcc387081a3a7b1c4e056053444908ac" args="(greater, type, member, prev, _start)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define __sllnk_oddeven_scan</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">prev, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_start&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {\
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_ip = prev;                                \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_i = _start;                               \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_jp = _k_i;                                \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_j = _k_i-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                           \
        <span class="keywordflow">while</span> (_k_j != _k_e) {                                  \
            type * _k_pi = container_of(_k_i, type, member);    \
            type * _k_pj = container_of(_k_j, type, member);    \
            <span class="keywordflow">if</span> (greater(_k_pi, _k_pj)) {                        \
                <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_t = _k_i;                         \
                _k_i = _k_j;                                    \
                _k_j = _k_t;                                    \
                <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga025032aebb054b46a91bab860f2278fe" title="交换两个节点">sllnk_iter_swap</a>(_k_jp, _k_i, _k_ip, _k_j);      \
                _k_pc = 1;                                      \
            }                                                   \
            <span class="keywordflow">if</span> (!_k_j) <span class="keywordflow">break</span>;                                   \
            _k_ip = _k_j;                                       \
            _k_i = _k_j-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                                  \
            <span class="keywordflow">if</span> (!_k_i) <span class="keywordflow">break</span>;                                   \
            _k_jp = _k_i;                                       \
            _k_j = _k_i-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                                  \
        }                                                       \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00995">995</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga5fa4d81762787f660e71b5176c4013f6"></a><!-- doxytag: member="sllnk.h::sllnk_select_sort" ref="ga5fa4d81762787f660e71b5176c4013f6" args="(bprev, _begin, _end, greater, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_select_sort</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bprev, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>对表进行选择排序 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">bprev</td><td>起始位置前驱 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏 升序:((*i)-&gt;x &gt; (*j)-&gt;x) 降序:((*i)-&gt;x &lt; (*j)-&gt;x) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga64040e29b9c1ec653152659570049967" title="判断表是否可以排序">sllnk_sortable</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae81b65037e8dfc7fb53a6bc284787079" title="判断表是否按序">sllnk_is_sorted</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l01032">1032</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa38a8df25dd9a93ac472d20d647afc98"></a><!-- doxytag: member="sllnk.h::sllnk_insert_sort" ref="gaa38a8df25dd9a93ac472d20d647afc98" args="(bprev, _begin, _end, greater_equal, type, member)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define sllnk_insert_sort</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">bprev, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_begin, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">_end, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">greater_equal, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">type, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">member&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>值:</b><div class="fragment"><pre class="fragment"><span class="keywordflow">do</span> {<a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_e = (_end);                                   \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_f = (_begin);                                 \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_p = (bprev);                                  \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_ip = _k_f;                                    \
        <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_i = _k_f-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                               \
        <span class="keywordflow">for</span> (; _k_i != _k_e; _k_i = _k_i-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>) {                   \
            type * _k_pi = container_of(_k_i, type, member);        \
            <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_jp = _k_p;                                \
            <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_j = _k_p-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                           \
            <span class="keywordflow">while</span> (_k_j != _k_i) {                                  \
                type * _k_pj = container_of(_k_j, type, member);    \
                <span class="keywordflow">if</span> (greater_equal(_k_pj, _k_pi)) {                  \
                    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> _k_t = _k_i;                         \
                    _k_i = _k_ip;                                   \
                    <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4b7aa639ac401210a396f01293c5e002" title="擦除节点">sllnk_erase</a>(_k_ip, _k_t);                       \
                    <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga46ec6a361119752b8cfd6e9e96acb922" title="插入节点到指定位置">sllnk_insert</a>(_k_jp, _k_j, _k_t);                \
                    <span class="keywordflow">break</span>;                                          \
                }                                                   \
                _k_jp = _k_j;                                       \
                _k_j = _k_j-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;                                  \
            }                                                       \
            _k_ip = _k_i;                                           \
        }                                                           \
    } <span class="keywordflow">while</span> (0)
</pre></div>
<p>对表进行插入排序 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">bprev</td><td>起始位置前驱 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">_end</td><td>终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">greater</td><td>比较函数或宏 升序:((*i)-&gt;x &gt; (*j)-&gt;x) 降序:((*i)-&gt;x &lt; (*j)-&gt;x) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>拥有者类型 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">member</td><td>所在成员名 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga64040e29b9c1ec653152659570049967" title="判断表是否可以排序">sllnk_sortable</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae81b65037e8dfc7fb53a6bc284787079" title="判断表是否按序">sllnk_is_sorted</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l01076">1076</a>行定义。</p>

</div>
</div>
<hr/><h2>函数文档</h2>
<a class="anchor" id="gaf3a28f89d0fda0521c30210350488f87"></a><!-- doxytag: member="sllnk.h::sllnk_check" ref="gaf3a28f89d0fda0521c30210350488f87" args="(sllnk_head *head, sllnk_iter *loop_entry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API int sllnk_check </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a> *&#160;</td>
          <td class="paramname"><em>loop_entry</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断链表结构是否正常 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">loop_entry</td><td>指向保存环路入口的迭代器，可以为NULL。 若为空，则不返回环路入口； 若不为空，则函数将环路入口保存到loop_entry </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">SLLNK_CHECK_PASS</td><td>0 正常 </td></tr>
    <tr><td class="paramname">SLLNK_CHECK_LOOP</td><td>1 有非法环路 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8c_source.html">sllnk.c</a>第<a class="el" href="sllnk_8c_source.html#l00021">21</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9db979ce8eb374bd90663f8198f7640c"></a><!-- doxytag: member="sllnk.h::sllnk_init" ref="ga9db979ce8eb374bd90663f8198f7640c" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>初始化表头 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">head</td><td>目标表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_head</a> head;
    <span class="comment">// 初始化</span>
    <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9db979ce8eb374bd90663f8198f7640c" title="初始化表头">sllnk_init</a>(&amp;head);
</pre></div> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00092">92</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa9ec544e0a8ad92808fa2669ead6fa95"></a><!-- doxytag: member="sllnk.h::sllnk_empty" ref="gaa9ec544e0a8ad92808fa2669ead6fa95" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int sllnk_empty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断表是否为空 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span> (!<a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaa9ec544e0a8ad92808fa2669ead6fa95" title="判断表是否为空">sllnk_empty</a>(&amp;head)) {
        ......
    }
</pre></div> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00111">111</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga13cb4a8dee9d5a76883be42da95242d2"></a><!-- doxytag: member="sllnk.h::sllnk_singular" ref="ga13cb4a8dee9d5a76883be42da95242d2" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int sllnk_singular </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断表是否只有单个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="keywordflow">if</span> (<a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga13cb4a8dee9d5a76883be42da95242d2" title="判断表是否只有单个节点">sllnk_singular</a>(&amp;head)) {
        ......
    }
</pre></div> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00135">135</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga64040e29b9c1ec653152659570049967"></a><!-- doxytag: member="sllnk.h::sllnk_sortable" ref="ga64040e29b9c1ec653152659570049967" args="(sllnk_iter begin, sllnk_iter end)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int sllnk_sortable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>end</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断表是否可以排序 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">begin</td><td>起始位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">end</td><td>结束位置 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>即判断是否至少有两个节点 </dd></dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> begin = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae0332daf7a77f42da92bc167e9d1c20f" title="得到指向正向起始位置的迭代器">sllnk_begin</a>(&amp;head);
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> end = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9405c7571626041455287739689711ed" title="得到指向正向终止位置的迭代器">sllnk_end</a>(&amp;head);
    <span class="comment">// 判断是否可以排序</span>
    <span class="keywordflow">if</span> (<a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga64040e29b9c1ec653152659570049967" title="判断表是否可以排序">sllnk_sortable</a>(begin, end)) {
        <span class="comment">// 插入排序</span>
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaa38a8df25dd9a93ac472d20d647afc98" title="对表进行插入排序">sllnk_insert_sort</a>(begin, end, DATA_GreaterEqual, DATA, node);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae7eec31cbfd41f487ae7aa14322411aa" title="对表进行冒泡排序">sllnk_bubble_sort</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9ed645e7bd4da0be5b3e862cd8069f46" title="对表进行奇偶排序">sllnk_oddeven_sort</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga5fa4d81762787f660e71b5176c4013f6" title="对表进行选择排序">sllnk_select_sort</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaa38a8df25dd9a93ac472d20d647afc98" title="对表进行插入排序">sllnk_insert_sort</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae81b65037e8dfc7fb53a6bc284787079" title="判断表是否按序">sllnk_is_sorted</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00162">162</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaf2fdf863715cfc6cd8b72da21d7cbfef"></a><!-- doxytag: member="sllnk.h::sllnk_serialable" ref="gaf2fdf863715cfc6cd8b72da21d7cbfef" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int sllnk_serialable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断表是否可以序列化 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>即判断是否至少有一个节点 </dd></dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 判断是否可以序列化</span>
    <span class="keywordflow">if</span> (<a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaf2fdf863715cfc6cd8b72da21d7cbfef" title="判断表是否可以序列化">sllnk_serialable</a>(&amp;head)) {
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga39fa3e813e6a625efe53eaf0d93ce11b" title="表头">sllnk_head</a>(DATA*) seq;
        <span class="comment">// 分配序列缓存</span>
        DATA** buf = (DATA**)malloc(sizeof(DATA*) * list_cnt);
        <span class="comment">// 序列化</span>
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3accd691a53c124906fcbc1193c479fe" title="表的序列化">sllnk_serialize</a>(&amp;head, buf, DATA, node);
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga08213d0c7bcf381b466b18e3822c6934" title="初始化序列">SLSEQ_INIT_SERIAL</a>(DATA*, &amp;seq, buf, list_cnt);
        <span class="comment">// 希尔排序</span>
        <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga197b786747dc3c95744f2bf8060b36ad" title="希尔排序">slseq_shell_sort</a>(DATA*, <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga2696503718b3292109d395da44c988b6" title="得到指向正向起始位置的迭代器">slseq_begin</a>(&amp;seq), 
            <a class="code" href="group___xE5_x8D_x95_xE7_xAB_xAF_xE7_xBA_xBF_xE5_xBD_xA2_xE5_xBA_x8F_xE8_xA1_xA8.html#ga5b3212d3b18809e193c701f7c6fef755" title="得到指向正向终止位置的迭代器">slseq_end</a>(&amp;seq), DATA_Greater);
        <span class="comment">// 反序列化</span>
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gac4c1d75fd2b796cc96095c076e0c5b24" title="表的反序列化">sllnk_deserialize</a>(&amp;head, buf, list_cnt, DATA, node);
        <span class="comment">// 释放缓存</span>
        free(buf);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3accd691a53c124906fcbc1193c479fe" title="表的序列化">sllnk_serialize</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gac4c1d75fd2b796cc96095c076e0c5b24" title="表的反序列化">sllnk_deserialize</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00196">196</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga48f184f2bb9b0127577d0cf60aac9910"></a><!-- doxytag: member="sllnk.h::sllnk_link" ref="ga48f184f2bb9b0127577d0cf60aac9910" args="(sllnk_iter prev, sllnk_iter next)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_link </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>next</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>链接两个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">prev</td><td>前驱节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">next</td><td>后继节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>链接prev和next节点 </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00208">208</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga839ab5172ceae9b8850828d733dad8bb"></a><!-- doxytag: member="sllnk.h::sllnk_insert_between" ref="ga839ab5172ceae9b8850828d733dad8bb" args="(sllnk_node *newly, sllnk_iter prev, sllnk_iter next)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_insert_between </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_node</a> *&#160;</td>
          <td class="paramname"><em>newly</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>next</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>在两个节点之间插入一个新节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">prev</td><td>前驱节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">next</td><td>后继节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>将newly节点插入到prev和next节点之间。如果prev和next不是相邻节点， 则newly将替换掉prev和next之间的所有节点 </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00226">226</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga46ec6a361119752b8cfd6e9e96acb922"></a><!-- doxytag: member="sllnk.h::sllnk_insert" ref="ga46ec6a361119752b8cfd6e9e96acb922" args="(sllnk_iter prev, sllnk_iter pos, sllnk_node *newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_insert </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_node</a> *&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>插入节点到指定位置 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">prev</td><td>pos的前驱节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pos</td><td>插入位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>将newly节点插入到pos的位置上，pos是从表头开始的位置 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> pp = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga8de47ce32788fc05494a1391035a980c" title="根据正向索引得到迭代器">sllnk_at</a>(&amp;head, 7);
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> pos = pp-&gt;<a class="code" href="struct____sllnk__node.html#a8442b9c6239b7f8b26caeaf3afe49966" title="后继节点">next</a>;
    DATA* p = (DATA*)malloc(<span class="keyword">sizeof</span>(DATA));
    <span class="comment">// 将p节点插入到pos所在的位置</span>
    <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga46ec6a361119752b8cfd6e9e96acb922" title="插入节点到指定位置">sllnk_insert</a>(pp, pos, &amp;p-&gt;node);
</pre></div> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00265">265</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga4b7aa639ac401210a396f01293c5e002"></a><!-- doxytag: member="sllnk.h::sllnk_erase" ref="ga4b7aa639ac401210a396f01293c5e002" args="(sllnk_iter prev, sllnk_iter entry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_erase </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>entry</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>擦除节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">prev</td><td>目标节点前驱 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">entry</td><td>目标节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> p = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gadb1426ce49b23aa186963607e40d799f" title="得到指向正向起始位置前驱的迭代器">sllnk_pbegin</a>(&amp;head);
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> e = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9405c7571626041455287739689711ed" title="得到指向正向终止位置的迭代器">sllnk_end</a>(&amp;head);
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> i = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae0332daf7a77f42da92bc167e9d1c20f" title="得到指向正向起始位置的迭代器">sllnk_begin</a>(&amp;head);
    <span class="keywordflow">while</span> (i != e) {
        <span class="keywordflow">if</span> (is_bad_data(container_of(i, DATA, node)))
            <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4b7aa639ac401210a396f01293c5e002" title="擦除节点">sllnk_erase</a>(p, <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga8f56fbc2aa8e161d582839169db33ff7" title="迭代器后自增">sllnk_inc_later</a>(i));
        <span class="keywordflow">else</span>
            <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga5ad9cdcf3a9e295b51a12365f08982b4" title="迭代器递增，并更新前驱迭代器">sllnk_prev_inc</a>(p, i);
    }
</pre></div> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00289">289</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga5a5b7fc4485177c98650d4e37c1c203c"></a><!-- doxytag: member="sllnk.h::sllnk_erases" ref="ga5a5b7fc4485177c98650d4e37c1c203c" args="(sllnk_iter bprev, sllnk_iter begin, sllnk_iter end, sllnk_pr1 erase_handler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_erases </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>bprev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>begin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>end</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga6f2d9337131eea4f623e0cf80851222e">sllnk_pr1</a>&#160;</td>
          <td class="paramname"><em>erase_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>清空区域 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">bprev</td><td>区域起始位置前驱 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">begin</td><td>区域起始位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">end</td><td>区域终止位置 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">erase_handler</td><td>移除响应函数，通常用于监视和释放节点，可以传递NULL, 表示不为删除的节点调用响应来处理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会为每一个被移除的节点调用erase_handler来处理节点 </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00312">312</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga2efa8b83e260b8089162cf07bcf1d1ac"></a><!-- doxytag: member="sllnk.h::sllnk_clear" ref="ga2efa8b83e260b8089162cf07bcf1d1ac" args="(sllnk_head *head, sllnk_pr1 erase_handler)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga6f2d9337131eea4f623e0cf80851222e">sllnk_pr1</a>&#160;</td>
          <td class="paramname"><em>erase_handler</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>清空表 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">erase_handler</td><td>移除响应函数，通常用于监视和释放节点，可以传递NULL, 表示不为删除的节点调用响应来处理 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>函数会为每一个被移除的节点调用erase_handler来处理节点 </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00328">328</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gae69537c14fd302544fc35320d1d46239"></a><!-- doxytag: member="sllnk.h::sllnk_push_front" ref="gae69537c14fd302544fc35320d1d46239" args="(sllnk_head *head, sllnk_node *newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_push_front </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_node</a> *&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>在表首添加节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00339">339</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga2552641116eba8642dd337f222c80bfb"></a><!-- doxytag: member="sllnk.h::sllnk_pop_front" ref="ga2552641116eba8642dd337f222c80bfb" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_pop_front </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>移除表首节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00349">349</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga35dc866136e1b138ae33345040d6f77c"></a><!-- doxytag: member="sllnk.h::sllnk_splice_between" ref="ga35dc866136e1b138ae33345040d6f77c" args="(sllnk_iter prev, sllnk_iter next, sllnk_iter first_prev, sllnk_iter first, sllnk_iter last, sllnk_iter last_next)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_splice_between </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>next</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>first_prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>first</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>last</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>last_next</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>在两个节点之间插入多个连续节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">prev</td><td>前驱节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">next</td><td>后继节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">first_prev</td><td>首节点的前驱节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">first</td><td>首节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">last</td><td>尾节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">last_next</td><td>尾节点的后继节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>将从first至last的节点嫁接到prev和next之间。如果prev和next之间有节点， 则它们之间的节点将会被替换 </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00369">369</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaef1c4facd637f5e45cab45bb49fbde89"></a><!-- doxytag: member="sllnk.h::sllnk_splice" ref="gaef1c4facd637f5e45cab45bb49fbde89" args="(sllnk_iter prev, sllnk_iter pos, sllnk_iter first_prev, sllnk_iter first, sllnk_iter last)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_splice </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>first_prev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>first</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>last</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>在两个节点之间插入多个连续节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">prev</td><td>pos的前驱节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pos</td><td>插入位置 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">first_prev</td><td>首节点的前驱节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">first</td><td>首节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">last</td><td>尾节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>将从first至last的节点嫁接到pos位置。可以跨链表移动 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 将a链表的节点全部嫁接到b链表</span>
    <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaef1c4facd637f5e45cab45bb49fbde89" title="在两个节点之间插入多个连续节点">sllnk_splice</a>(bprev, b, a, <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gafb2f6a5ef9f9022c078c9e14a5f17a19" title="得到表首节点">sllnk_front</a>(a), sllnk_back(b));
    <span class="comment">// 将b到e的节点们移动到第4个节点的位置</span>
    <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gaef1c4facd637f5e45cab45bb49fbde89" title="在两个节点之间插入多个连续节点">sllnk_splice</a>(<a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga8de47ce32788fc05494a1391035a980c" title="根据正向索引得到迭代器">sllnk_at</a>(head, 2), <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga8de47ce32788fc05494a1391035a980c" title="根据正向索引得到迭代器">sllnk_at</a>(head, 3), bprev, b, e);
</pre></div> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00404">404</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga6ccd0259977fb9ff2af4ecd88b58c69a"></a><!-- doxytag: member="sllnk.h::sllnk_count" ref="ga6ccd0259977fb9ff2af4ecd88b58c69a" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t sllnk_count </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>统计表的节点数量 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回表的节点总数 </dd></dl>

<p>在文件<a class="el" href="sllnk_8c_source.html">sllnk.c</a>第<a class="el" href="sllnk_8c_source.html#l00093">93</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gab571a5517dd25a0ec46f2366cc82ceb8"></a><!-- doxytag: member="sllnk.h::sllnk_distance" ref="gab571a5517dd25a0ec46f2366cc82ceb8" args="(sllnk_iter first, sllnk_iter last)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t sllnk_distance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>first</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>last</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算两个节点的迭代距离 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>首节点 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>尾节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>注解:</b></dt><dd>以索引为例，2到4的距离是4 (4-2+1=3) </dd></dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回距离 </dd></dl>

<p>在文件<a class="el" href="sllnk_8c_source.html">sllnk.c</a>第<a class="el" href="sllnk_8c_source.html#l00081">81</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga2694883bb0b412a2f5cb42bd28e836f0"></a><!-- doxytag: member="sllnk.h::sllnk_advance" ref="ga2694883bb0b412a2f5cb42bd28e836f0" args="(sllnk_iter cur, size_t dist)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_advance </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>cur</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>dist</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>给迭代器增加一段距离或减小一段距离 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cur</td><td>迭代器 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dist</td><td>增加的距离。正数时，表示增加；负数时，表示减小 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回新迭代器 </dd></dl>

<p>在文件<a class="el" href="sllnk_8c_source.html">sllnk.c</a>第<a class="el" href="sllnk_8c_source.html#l00113">113</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga8de47ce32788fc05494a1391035a980c"></a><!-- doxytag: member="sllnk.h::sllnk_at" ref="ga8de47ce32788fc05494a1391035a980c" args="(sllnk_head *head, const size_t index)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_at </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const size_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>根据正向索引得到迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>索引，从0开始 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回对应的迭代器 </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00444">444</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9716e197658ec5b83603c054f081ae5c"></a><!-- doxytag: member="sllnk.h::sllnk_index_of" ref="ga9716e197658ec5b83603c054f081ae5c" args="(sllnk_head *head, sllnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API size_t sllnk_index_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>计算迭代器的正向索引 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>size_t 返回索引 </dd></dl>

<p>在文件<a class="el" href="sllnk_8c_source.html">sllnk.c</a>第<a class="el" href="sllnk_8c_source.html#l00121">121</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga190d801d0f6ad9a29f22d64fa4364bdb"></a><!-- doxytag: member="sllnk.h::sllnk_node_init" ref="ga190d801d0f6ad9a29f22d64fa4364bdb" args="(sllnk_node *entry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_node_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_node</a> *&#160;</td>
          <td class="paramname"><em>entry</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>初始化节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">entry</td><td>节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00463">463</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gaa7ccf98727ba5b9c30c745fd3d1ca093"></a><!-- doxytag: member="sllnk.h::sllnk_iter_replace" ref="gaa7ccf98727ba5b9c30c745fd3d1ca093" args="(sllnk_node *vprev, sllnk_node *victim, sllnk_node *newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_iter_replace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_node</a> *&#160;</td>
          <td class="paramname"><em>vprev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_node</a> *&#160;</td>
          <td class="paramname"><em>victim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_node</a> *&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>用新节点替换目标节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">vprev</td><td>目标节点前驱 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">victim</td><td>受害目标节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">newly</td><td>新节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00476">476</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga025032aebb054b46a91bab860f2278fe"></a><!-- doxytag: member="sllnk.h::sllnk_iter_swap" ref="ga025032aebb054b46a91bab860f2278fe" args="(sllnk_iter aprev, sllnk_iter a, sllnk_iter bprev, sllnk_iter b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_iter_swap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>aprev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>bprev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>交换两个节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">aprev</td><td>第一个节点前驱 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">a</td><td>第一个节点 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">bprev</td><td>第二个节点前驱 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">b</td><td>第二个节点 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00499">499</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga0f593516aa686d3bfc8556592adceca3"></a><!-- doxytag: member="sllnk.h::sllnk_replace" ref="ga0f593516aa686d3bfc8556592adceca3" args="(sllnk_head *victim, sllnk_head *newly)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline void sllnk_replace </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>victim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>newly</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>用新表头替换目标表头 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">victim</td><td>受害目标表头 </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">newly</td><td>新表头 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00511">511</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gac039ab7a892f93c222db2ebd2bc9bedd"></a><!-- doxytag: member="sllnk.h::sllnk_exist" ref="gac039ab7a892f93c222db2ebd2bc9bedd" args="(sllnk_head *head, sllnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline int sllnk_exist </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>判断一个节点是否存在于表中 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>目标节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>int 返回结果 </dd></dl>
<dl><dt><b>返回值:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>真 </td></tr>
    <tr><td class="paramname">0</td><td>假 </td></tr>
  </table>
  </dd>
</dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00552">552</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gafb2f6a5ef9f9022c078c9e14a5f17a19"></a><!-- doxytag: member="sllnk.h::sllnk_front" ref="gafb2f6a5ef9f9022c078c9e14a5f17a19" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_front </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到表首节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回表首节点 </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00563">563</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gae0332daf7a77f42da92bc167e9d1c20f"></a><!-- doxytag: member="sllnk.h::sllnk_begin" ref="gae0332daf7a77f42da92bc167e9d1c20f" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_begin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向正向起始位置的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回迭代器 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 遍历链表</span>
    <span class="keywordtype">int</span> index = 0;
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> e = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9405c7571626041455287739689711ed" title="得到指向正向终止位置的迭代器">sllnk_end</a>();
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> i = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae0332daf7a77f42da92bc167e9d1c20f" title="得到指向正向起始位置的迭代器">sllnk_begin</a>(&amp;head);
    <span class="keywordflow">while</span> (i != e) {
        printf(<span class="stringliteral">&quot;[%d]=%d\n&quot;</span>, index++, owner_of(i, DATA, node).data);
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga66e49ff1a172491e65ca54e93028e105" title="迭代器递增">sllnk_inc</a>(i);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9405c7571626041455287739689711ed" title="得到指向正向终止位置的迭代器">sllnk_end</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gadb1426ce49b23aa186963607e40d799f" title="得到指向正向起始位置前驱的迭代器">sllnk_pbegin</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00586">586</a>行定义。</p>

</div>
</div>
<a class="anchor" id="gadb1426ce49b23aa186963607e40d799f"></a><!-- doxytag: member="sllnk.h::sllnk_pbegin" ref="gadb1426ce49b23aa186963607e40d799f" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_pbegin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向正向起始位置前驱的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回迭代器 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> p = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gadb1426ce49b23aa186963607e40d799f" title="得到指向正向起始位置前驱的迭代器">sllnk_pbegin</a>(&amp;head);
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> e = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9405c7571626041455287739689711ed" title="得到指向正向终止位置的迭代器">sllnk_end</a>();
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> i = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae0332daf7a77f42da92bc167e9d1c20f" title="得到指向正向起始位置的迭代器">sllnk_begin</a>(&amp;head);
    <span class="keywordflow">while</span> (i != e) {
        <span class="keywordflow">if</span> (is_bad_data(container_of(i, DATA, node)))
            <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4b7aa639ac401210a396f01293c5e002" title="擦除节点">sllnk_erase</a>(p, <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga8f56fbc2aa8e161d582839169db33ff7" title="迭代器后自增">sllnk_inc_later</a>(i));
        <span class="keywordflow">else</span>
            <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga5ad9cdcf3a9e295b51a12365f08982b4" title="迭代器递增，并更新前驱迭代器">sllnk_prev_inc</a>(p, i);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae0332daf7a77f42da92bc167e9d1c20f" title="得到指向正向起始位置的迭代器">sllnk_begin</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga9405c7571626041455287739689711ed" title="得到指向正向终止位置的迭代器">sllnk_end</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00610">610</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga9405c7571626041455287739689711ed"></a><!-- doxytag: member="sllnk.h::sllnk_end" ref="ga9405c7571626041455287739689711ed" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_end </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到指向正向终止位置的迭代器 </p>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回迭代器 </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gae0332daf7a77f42da92bc167e9d1c20f" title="得到指向正向起始位置的迭代器">sllnk_begin</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#gadb1426ce49b23aa186963607e40d799f" title="得到指向正向起始位置前驱的迭代器">sllnk_pbegin</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00621">621</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga8531e6d10114d55255b7bb8c0f46cc56"></a><!-- doxytag: member="sllnk.h::sllnk_end_of" ref="ga8531e6d10114d55255b7bb8c0f46cc56" args="(sllnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_end_of </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前迭代器的正向终止位置 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>迭代器 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回迭代器 </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00632">632</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga32fbba7563e8bc0df1b1ab1c5709834f"></a><!-- doxytag: member="sllnk.h::sllnk_next" ref="ga32fbba7563e8bc0df1b1ab1c5709834f" args="(sllnk_iter itr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_next </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_iter</a>&#160;</td>
          <td class="paramname"><em>itr</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到当前节点的后继节点 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">itr</td><td>当前节点 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回后继节点 </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00643">643</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga4c010000f3a7fc4d9c3ff5199896d627"></a><!-- doxytag: member="sllnk.h::sllnk_vbegin" ref="ga4c010000f3a7fc4d9c3ff5199896d627" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_vbegin </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到用于反转的起始位置的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回迭代器 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 反转表</span>
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> ve = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga169be3d345b481c5c2655abbfd663826" title="得到用于反转的终止位置的迭代器">sllnk_vend</a>(&amp;head);
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> vi = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4c010000f3a7fc4d9c3ff5199896d627" title="得到用于反转的起始位置的迭代器">sllnk_vbegin</a>(&amp;head);
    <span class="keywordflow">while</span> (vi != ve) {
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3cc566e864a08f9a5d5aae4ccb525768" title="入栈反转操作">sllnk_vpush</a>(&amp;head, vi);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga169be3d345b481c5c2655abbfd663826" title="得到用于反转的终止位置的迭代器">sllnk_vend</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3cc566e864a08f9a5d5aae4ccb525768" title="入栈反转操作">sllnk_vpush</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga71dc4ef578add6513b4eb045b41dcecb" title="反转表">sllnk_reverse</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00745">745</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga169be3d345b481c5c2655abbfd663826"></a><!-- doxytag: member="sllnk.h::sllnk_vend" ref="ga169be3d345b481c5c2655abbfd663826" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static inline <a class="el" href="struct____sllnk__node.html">sllnk_iter</a> sllnk_vend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>得到用于反转的终止位置的迭代器 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>返回:</b></dt><dd>sllnk_iter 返回迭代器 </dd></dl>
<dl class="user"><dt><b>示例:</b></dt><dd><div class="fragment"><pre class="fragment">    <span class="comment">// 反转表</span>
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> ve = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga169be3d345b481c5c2655abbfd663826" title="得到用于反转的终止位置的迭代器">sllnk_vend</a>(&amp;head);
    <a class="code" href="struct____sllnk__node.html" title="单向线形链表节点">sllnk_iter</a> vi = <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4c010000f3a7fc4d9c3ff5199896d627" title="得到用于反转的起始位置的迭代器">sllnk_vbegin</a>(&amp;head);
    <span class="keywordflow">while</span> (vi != ve) {
        <a class="code" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3cc566e864a08f9a5d5aae4ccb525768" title="入栈反转操作">sllnk_vpush</a>(&amp;head, vi);
    }
</pre></div> </dd></dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4c010000f3a7fc4d9c3ff5199896d627" title="得到用于反转的起始位置的迭代器">sllnk_vbegin</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3cc566e864a08f9a5d5aae4ccb525768" title="入栈反转操作">sllnk_vpush</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga71dc4ef578add6513b4eb045b41dcecb" title="反转表">sllnk_reverse</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8h_source.html">sllnk.h</a>第<a class="el" href="sllnk_8h_source.html#l00766">766</a>行定义。</p>

</div>
</div>
<a class="anchor" id="ga71dc4ef578add6513b4eb045b41dcecb"></a><!-- doxytag: member="sllnk.h::sllnk_reverse" ref="ga71dc4ef578add6513b4eb045b41dcecb" args="(sllnk_head *head)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NV_API void sllnk_reverse </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct____sllnk__node.html">sllnk_head</a> *&#160;</td>
          <td class="paramname"><em>head</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>反转表 </p>
<dl><dt><b>参数:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">head</td><td>表头 </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>参见:</b></dt><dd><a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga4c010000f3a7fc4d9c3ff5199896d627" title="得到用于反转的起始位置的迭代器">sllnk_vbegin</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga169be3d345b481c5c2655abbfd663826" title="得到用于反转的终止位置的迭代器">sllnk_vend</a>, <a class="el" href="group___xE5_x8D_x95_xE5_x90_x91_xE7_xBA_xBF_xE5_xBD_xA2_xE9_x93_xBE_xE8_xA1_xA8.html#ga3cc566e864a08f9a5d5aae4ccb525768" title="入栈反转操作">sllnk_vpush</a> </dd></dl>

<p>在文件<a class="el" href="sllnk_8c_source.html">sllnk.c</a>第<a class="el" href="sllnk_8c_source.html#l00106">106</a>行定义。</p>

</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全部</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>数据结构</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>文件</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>函数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>变量</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>类型定义</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>宏定义</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>Generated at 2015年七月16日 星期四 12:00:41 for Navo Portable Library by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
